<?php

/**
* @current cmscomment.php
* @author   LiuYang <liu_yang@haibao.com>
* @date 2017年2月8日 下午5:06:28
*/

namespace haibao\jiepai\model\data\comment;

class CmsComment extends \haibao\jiepai\model\data\Base{
    /**
     * 0未读，1已读
     */
    const STATUS_NOREAD = 0;
    const STATUS_ISREAD = 1;
    
    /**
     * 0.文章评论，1.达人留言板，2：单图
     */
    const TYPE_ARTICLE = 0;
    const TYPE_FASHIONSTAR = 1;
    const TYPE_PICTURE = 2;
    
    /**
     * `AuditStatus` tinyint(4) DEFAULT '0' COMMENT '审核状态 0-未审核 1-已审核 2-审核未通过',
     */
    const AUDITSTATUS_NO = 0;
    const AUDITSTATUS_YES = 1;
    const AUDITSTATUS_NOPASSED = 2;
    const AUDITSTATUS_SENSITIVE = 3;//根据敏感词字段判断
    
    /**
     * 是否精华 0 不是 1 是 
     */
    CONST ISBEST_NO = 0;
    CONST ISBEST_YES = 1;
    
    /**
     * 删除时置为-1，默认是0
     * 是否是删除
     */
    const FLAG_IS = 0;
    const FLAG_DEL = -1;
    
    
    /**
     * 若Type为文章，则为文章ID，否则为达人ID
     */
    public $TypeID;
    
    public $Type;
    
    public $Content;
    
    public $UserID;
    
    public $CreateTime;
    
    public $UpdateTime;
    
    public $ReplyNum;
    
    public $PraiseNum;
    
    public $Status;
    
    public $AuditStatus;
    
    /**
     * 审核时间
     */
    public $AuditTime;
    
    /**
     * 审核人ID
     */
    public $AuditUserID;
    
    /**
     * 敏感词,一组敏感词以###隔开
     */
    public $SensitiveWords;
    
    /**
     * @var unknown
     */
    public $FileID;

    public $Flag;
    
    public $Scores;
    
    public $IsBest;
    /**
     * 街友评审团针对位置的评论
     */
    public $ContentIndex;
    /**
     * 文章信息
     */
    public $ArticleInfo;
    
    
    public function __construct(){
        parent::__construct();
        
        $this->setColumnName('Id', 'CommentID');
        
        $this->intField('TypeID', 'TypeID');
        $this->intField('Type', 'Type');
        $this->stringField('Content', 'Content');
        $this->intField('UserID', 'UserID');
        $this->dateField('CreateTime', 'CreateTime',true);
        $this->dateField('UpdateTime', 'UpdateTime');
        $this->intField('ReplyNum', 'ReplyNum');
        $this->intField('PraiseNum', 'PraiseNum');
        $this->intField('Status', 'Status');
        $this->intField('AuditStatus', 'AuditStatus');
        $this->dateField('AuditTime', 'AuditTime');
        $this->intField('AuditUserID', 'AuditUserID');
        $this->stringField('SensitiveWords', 'SensitiveWords');
        $this->intField('FileID', 'FileID');
        $this->intField('Flag', 'Flag');
        $this->intField('Scores', 'Scores');
        $this->intField('IsBest', 'IsBest');
        $this->intField('ContentIndex', 'ContentIndex');
        
        $this->setTableName('cms_comment');
    }
}
